package com.fitns.user.exception;

public enum CommMsgCode implements MsgCode {
    SERVICE_ERROR(200002, "服务端service异常"),
    NO_FILE(200003,"文件为空"),
    IO_ERROR(192000, "IO操作异常"),
    CACHE_ERROR(193000, "cache操作异常"),
    LOCAL_INVOKE_ERROR(194000, "Local api调用错误"),
    RPC_INVOKE_ERROR(195000, "RPC调用错误"),
    SECURITY_ERROR(196000, "安全错误"),
    DB_ERROR(191000, "数据库访问异常"),
    PARAM_ERROR(140000, "参数错误"),
    UNAUTHORIZED(401, "没有权限"),


    /**
     * 其它错误码
     */
    OTHER_ERROR(900000, "其它错误");


    ;


    private int code;
    private String message;

    CommMsgCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
